﻿/* Social Webpart javascript function need to move this content to another file */

var tabNames = new Array();
function SetText(tabName) {
    tabNames = JSON.parse(tabName);
}

$(document).ready(function () {
    var activeTabIndex = -1;
    //var tabNames = ["FaceBook", "Twitter"];


    $(".tab-menu > li").click(function (e) {
        for (var i = 0; i < tabNames.length; i++) {
            if (e.target.id == tabNames[i]) {
                activeTabIndex = i;
            } else {
                $("#" + tabNames[i]).removeClass("active");
                $("#" + tabNames[i] + "-tab").css("display", "none");
            }
        }
        $("#" + tabNames[activeTabIndex] + "-tab").fadeIn();
        $("#" + tabNames[activeTabIndex]).addClass("active");
        return false;
    });
});

/* Social Webpart javascript function need to move this content to another file */
